package com.jinke.api.modules.app.controller.res;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.util.List;

/**
 * @projectName:
 * @title: RuleSurchargeImportDto
 * @description:
 * @see:
 * @author: hhp
 * @version: 1.0.0
 * @createTime: 2024/7/31 15:17
 */
@Data
public class RuleSurchargeImportDto {
    @ApiModelProperty("渠道ID")
    private Long channelId;

    @ApiModelProperty("货运商运输服务code")
    private String serviceCode;

    @ApiModelProperty("渠道平台id")
    private Long channelPlatformId;

    @ApiModelProperty("上传的文件")
    private MultipartFile file;

    private List<RuleSurchargeImportDto.PriceRuleItem> priceRuleList;

    private List<RuleSurchargeImportDto.PriceSurchargeItem> priceSurchargeList;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PriceRuleItem {
        @ApiModelProperty("poundsLine")
        @ExcelProperty(value = "poundsLine")
        private Integer poundsLine;

        @ApiModelProperty("ozLine")
        @ExcelProperty(value = "ozLine")
        private Integer ozLine;

        @ApiModelProperty("zone1")
        @ExcelProperty(value = "zone1")
        private BigDecimal zone1;

        @ApiModelProperty("zone2")
        @ExcelProperty(value = "zone2")
        private BigDecimal zone2;

        @ApiModelProperty("zone3")
        @ExcelProperty(value = "zone3")
        private BigDecimal zone3;

        @ApiModelProperty("zone4")
        @ExcelProperty(value = "zone4")
        private BigDecimal zone4;

        @ApiModelProperty("zone5")
        @ExcelProperty(value = "zone5")
        private BigDecimal zone5;

        @ApiModelProperty("zone6")
        @ExcelProperty(value = "zone6")
        private BigDecimal zone6;

        @ApiModelProperty("zone7")
        @ExcelProperty(value = "zone7")
        private BigDecimal zone7;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PriceSurchargeItem {
        @ApiModelProperty("Surcharge.item")
        @ExcelProperty(value = "Surcharge", index = 0)
        private String item;

        @ApiModelProperty("Surcharge.serviceCode")
        @ExcelProperty(value = "Surcharge", index = 1)
        private String serviceCode;

        @ApiModelProperty("zone")
        @ExcelProperty(value = "zone", index = 2)
        private String zones;

        @ApiModelProperty("rate")
        @ExcelProperty(value = "rate", index = 3)
        private BigDecimal rate;
    }
}
